package com.wing.cabinet.model.response;

import com.wing.cabinet.model.entity.UseInventoryUser;
import com.wing.cabinet.utils.ExcelExport;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.net.URL;
import java.time.LocalDateTime;

/**
 * 用户产品在用库存VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class UseInventoryUserVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @ExcelExport(value = "领用时间",sort = 140)
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    @ExcelExport(value = "领用人",sort = 100)
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 柜子id
     */
    private Long cabId;

    /**
     * sku id
     */
    private Long skuId;

    /**
     * 库存数量
     */
    @ExcelExport(value = "基础数量(在用数)",sort = 64)
    private Integer quantity;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 货道id
     */
    private Integer spaceId;

    /**
     * (0正常，1告警)
     */
    private Long status;

    /**
     * sku code
     */
    @ExcelExport(value = "物料编号",sort = 30)
    private String skuCode;

    /**
     * 柜子编码
     */
    @ExcelExport(value = "柜子编号",sort = 60)
    private String cabCode;

    /**
     * 货道
     */
    private String spaceCode;

    /**
     * 设备编号
     */
    @ExcelExport(value = "机台",sort = 90)
    private String deviceCode;




    /**
     * sku 名称
     */
    @ExcelExport(value = "物料名称",sort = 20)
    private String skuName;

    /**
     * sku 规格
     */
    private String skuSpec;

    /**
     * sku 图片
     */
    private String skuPic;
    //@ExcelExport(value = "产品图片",sort = 1)
    private URL skuPicVo;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 产品类型名称
     */
    private String productTypeName;

    /**
     * 产品分类名称
     */
    private String productCategoryName;

    /**
     * 产品品牌
     */
    @ExcelExport(value = "品牌",sort = 50)
    private String productBrandName;

    /**
     * 产品型号
     */
    private String productModelName;

    /**
     * 适配机床
     */
    private String deviceName;

    /**
     * 市场价
     */
    private BigDecimal marketPrice;

    @ExcelExport(value = "规格码",sort = 40)
    private String skuSpecOld;

    private String skuCodeOld;

    private String orderCode;

    private Long cellInventoryInoutId;


    private Long useInventoryInoutId;

    private Long useInventoryInoutDetailId;

    private String labelCode;

    private Long storageInventoryInoutId;

    private Long workOrderId;


    private Long departmentId;

    private Long deviceDepartmentId;
    @ExcelExport(value = "部门",sort = 110)
    private String departmentName;
    @ExcelExport(value = "机台部门",sort = 91)
    private String deviceDepartmentName;
    @ExcelExport(value = "成本中心",sort = 120)
    private String costCenter;

    /**
     * 企业编码
     */
    private String enterpriseCode;

    private UseInventoryUser.BusinessType businessType;

    private Long processId;
    @ExcelExport(value = "数量(包装计)",sort = 62)
    private Integer quantityPack;

    private Integer quantityPackUnit;


    private Long packId;
    @ExcelExport(value = "包装规格",sort = 61)
    private String packName;
    @ExcelExport(value = "包装单位",sort = 63)
    private String unitName;
    @ExcelExport(value = "基础单位",sort = 80)
    private String basicsUnitName;

    private BigDecimal price;

    private BigDecimal total;

}
